home *** CD-ROM | disk | FTP | other *** search
-
- SBACKUP Copyright (c) 1990 by George Kerber 12/23/90
-
- ---------------------------------------------------------------------------
- SHAREWARE SHAREWARE SHAREWARE SHAREWARE SHAREWARE SHAREWARE
- ---------------------------------------------------------------------------
-
- SBACKUP is SHAREWARE. If you try this program and continue to use it for
- over 30 days you are required to register your copy and make payment of
- $5 for use of the program. Please make payment of $5 to:
-
- George Kerber 19756 E. Linvale Drive
- 303-693-2890 Aurora, Colorado 80013
-
- ---------------------------------------------------------------------------
- SHAREWARE SHAREWARE SHAREWARE SHAREWARE SHAREWARE SHAREWARE
- ---------------------------------------------------------------------------
-
-
- Program: SBACKUP.EXE
- Programmer: George Kerber
- Written: 12/23/90 - 12/24/90
- Application: MS-DOS (3.0+) & AmigaDOS (1.2+)
- Purpose: Makes backing up your source code files easy
- (so you'll do it....).
-
- Requirements: MS-DOS 3.0 or higher.
- AmigaDOS 1.2 or higher. (2.0 compatible)
-
- How many times have you modified an existing source code file and
- then wished you could remove the changes? Sure, you could manually copy
- the source file each time you begin to make changes. But you'd
- have to manage a file naming scheme to insure that you could always tell
- the generation of the backup files. SBACKUP assists you in this goal.
- Simply execute SBACKUP with the name of your source code as it's only
- argument. SBACKUP will copy the source file to the same filename with
- an extension of .001, and shift up any existing backup filenames by 1.
-
- Once SBACKUP has created at least one backup file, it will make any
- more copies of the source code unless the sourcefile has been
- modified. See the section below for a complete example.
-
- SBACKUP supports up to 20 backup files. Once you have 20 backup files,
- SBACKUP will delete the 20th backup file to make room for the new
- backup. See the section below for information on how to change the
- maxfiles from 20 to a value of your choice. SBACKUP never modifies
- your sourcefile in any way. SBACKUP will backup any textfile, but is
- especially written to backup C, BASIC and PASCAL source code files.
- SBACKUP doesn't eliminate the need to be religious about doing hard
- disk backups, it just makes keeping multiple versions of source code
- handy and available.
-
-
- SYNTAX: SBACKUP [-number_backups] filename [destination_dir]
- -------
-
- Installation: MS-DOS: Copy SBACKUP.EXE to a directory in your
- ------------- current PATH.
-
- AmigaDOS: Copy SBACKUP to your c: directory or any
- directory in your current PATH.
-
- Suggested Usage: Create a batch file for each source project you wish
- ---------------- to create backups for. For example, suppose you had
- a "C" source file called program.c. Create a batch
- file called SAVE.BAT* which contains the following:
-
- ECHO OFF*
- SBACKUP program.c
-
- You can now do a source code backup of your program.c
- file by entering 'SAVE' at the DOS prompt. You should
- keep this SAVE.BAT* in the directory that your source
- code is kept. This way you can have a SAVE.BAT* batch
- file in every directory you maintain source code in.
- If you have multiple source files for a project, just
- add a line calling SBACKUP in the batch file for each
- filename or create a separate batch file with a
- different name for each sourcefile.
-
- If a number (preceded by a -) is entered on the
- command line before the sourcefile name, SBACKUP
- will use the new number as the maximum number of
- files to retain. The maximum must be between 2-99.
- The maxfiles can also be changed by setting an
- environmental variable as described below.
-
- If a destination directory is specified after the
- filename, all backup files will be written to the
- specified directory, instead of the current directory.
- A backup directory can be created to store all backup
- files to avoid cluttering up your current directory.
-
- -------------------------------------------------------
-
- * AmigaDOS batch files do not use the .BAT extension and
- don't need the 'ECHO OFF' statement. The batch file
- can be executed by entering:
-
- 1> execute batchfile
-
- or just
-
- 1> batchfile
-
- if the script bit is set (AmigaDOS 1.3 or higher).
-
- The script protection bit can be set by entering:
-
- 1> protect batchfile +s
-
- See your AmigaDOS manual for more information.
-
-
- Backup Filenames: Standard programming language source code files are
- ----------------- handled in a special way. If the file extension is
- C ("C"), BAS (BASIC), or P (PASCAL), the first
- character of the backup extension will be C, B, or P.
- The date and time of the backup will be written to the
- end of the back up file as a remark in the standard
- syntax of the language. For example:
-
- SBACKUP SOURCE.C -> SOURCE.C01 ...
- /* SBACKUP mm/dd/yy hh:mm:ss */
-
- SBACKUP SOURCE.BAS -> SOURCE.B01 ...
- REM SBACKUP mm/dd/yy hh:mm:ss
-
- SBACKUP SOURCE.PAS -> SOURCE.P01 ...
- (* SBACKUP mm/dd/yy hh:mm:ss *)
-
- SBACKUP SOURCE.DOC -> SOURCE.D01 ...
- n/a
-
- SBACKUP SOURCE.TXT -> SOURCE.T01 ...
- n/a
-
- SBACKUP SOURCE.readme -> SOURCE.001 ...
- n/a
-
- Change # Backups: SBACKUP will retain the last 20 backups. This value
- ----------------- can be changed by the user by setting the SBACKUP
- environmental variable with the desired value or via
- a command line option as described above.
-
- MS-DOS: c> set SBACKUP=n
- -------
-
- AmigaDOS: 1> setenv SBACKUP=n
- ---------
-
- Where 'n' = the number of backups you desire to be
- kept. The value must be between 2-99.
-
- The set/setenv command can be set on the DOS command
- line or in your autoexec.bat file/startup-sequence
- file.
-
-
- AmigaDOS Notes: SBACKUP will actually use the AmigaDOS 'COPY' command
- --------------- to copy the files if it can be found in the current
- PATH. If 'COPY' cannot be located, SBACKUP will
- copy the files itself, but the copy will be slower.
- SBACKUP can use the AmigaDOS and ARP COPY commands
- with no problems.
-
-
- ----------------------------------------------------------------------------
- MS-DOS Example: Suppose you had a directory where you kept the "C" source
- code and documentation for a program named widget. The program used the
- following files:
-
- MAIN.C
- FUNCTIONS.C
- OTHER.C
- MATH.C
- WIDGET.DOC
-
- Create this batch file named SAVE.BAT to keep the source and documents
- backed up to a directory named C:\SOURCE\BACKUP.
-
- ECHO OFF
- CLS
- SBACKUP MAIN.C C:\SOURCE\BACKUP : save up to 20 versions
- SBACKUP FUNCTIONS.C C:\SOURCE\BACKUP
- SBACKUP OTHER.C C:\SOURCE\BACKUP
- SBACKUP MATH.C C:\SOURCE\BACKUP
- SBACKUP -5 WIDGET.DOC C:\SOURCE\BACKUP : save only 5 versions
-
- Now whenever you execute the SAVE.BAT batch file, SBACKUP will check if
- the current backup is current and if not, it will copy the files to the
- C:\SOURCE\BACKUP directory with the correct extension.
-
- The first time you use SAVE.BAT the following files will be created:
-
- C:\SOURCE\BACKUP\MAIN.C01
- C:\SOURCE\BACKUP\FUNCTIONS.C01
- C:\SOURCE\BACKUP\OTHER.C01
- C:\SOURCE\BACKUP\MATH.C01
- C:\SOURCE\BACKUP\WIDGET.D01
-
- If you execute SAVE.BAT again, SBACKUP will inform you that all files are
- UP-TO-DATE. SBACKUP will only do another copy if the file has been changed.
-
- Suppose you modified MATH.C, and then executed SAVE.BAT again. SBACKUP
- would inform you that all other files were UP-TO-DATE. SBACKUP would
- rename C:\SOURCE\BACKUP\MATH.C01 to C:\SOURCE\BACKUP\MATH.C02 and then
- copy MATH.C to C:\SOURCE\BACKUP\MATH.C01.
-
- The latest version of all backups will always have the lowest extension.
-
- ---------------------------------------------------------------------------
- SHAREWARE SHAREWARE SHAREWARE SHAREWARE SHAREWARE SHAREWARE
- ---------------------------------------------------------------------------
-
- SBACKUP is SHAREWARE. You have permission to use this program for a period
- of 30 days. After 30 days you must send the author $5 for the use of the
- program and to register your copy. I assume no responsibility for the use
- of this program or it's operation (I hate responsibility).
-
-
- George Kerber
- 19756 E. Linvale Drive
- Aurora, Colorado 80013
- (303) 693-2890
-
- Compuserve: 74010,2132
-
- ---------------------------------------------------------------------------
-
-
-